<template>
    <div>
      <el-row>
        <el-col :span="8">
          <el-card>
            <div slot="header">当月派单数量</div>
            <div>{{ this.orderTypes.total_assigned }}</div>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card>
            <div slot="header">未派单数量</div>
            <div>{{ this.orderTypes.total_not_assigned }}</div>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card>
            <div slot="header">完成工单数量</div>
            <div>{{ this.orderTypes.total_completed }}</div>
          </el-card>
        </el-col>
      </el-row>

    </div>
  </template>
  
  <script>
import axios from 'axios';

  export default {
    data() {
      return {
        orderTypes:[],
        
      };
    },
    methods: {
      goToDispatch() {
        // this.$router.push('/dispatch');
        console.log(this.orderTypes)
      },
      goToReceive() {
        this.$router.push('/receive');
      }
    },
    mounted(){
      axios.post('/api/order/getOrderStatistics')
      .then(res=>{
        this.orderTypes = res.data.data;
      })
      
    }
  };
  </script>
  